<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_connect"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="ml.adamsprogs.einstein.mobile.activities.ConnectActivity">
    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:background="@color/primary"
        android:elevation="4dp"
        android:theme="@style/ThemeOverlay.AppCompat.Dark"
        tools:ignore="UnusedAttribute"
        tools:layout_constraintTop_creator="1"
        tools:layout_constraintLeft_creator="1"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <EditText
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:inputType="text|textUri"
        android:ems="10"
        android:id="@+id/serverAddress"
        android:hint="@string/server_address"
        app:layout_constraintRight_toLeftOf="@+id/serverPort"
        tools:layout_constraintRight_creator="1"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="16dp"
        app:layout_constraintBaseline_toBaselineOf="@+id/serverPort"
        tools:layout_constraintBaseline_creator="1"
        tools:layout_constraintLeft_creator="1"
        app:layout_constraintLeft_toLeftOf="parent"
        android:layout_marginLeft="16dp"
        android:layout_marginRight="16dp"/>

    <EditText
        android:layout_height="wrap_content"
        android:inputType="number"
        android:ems="10"
        android:id="@+id/serverPort"
        android:layout_width="64dp"
        android:hint="@string/server_port"
        tools:layout_constraintRight_creator="1"
        tools:layout_constraintBottom_creator="1"
        app:layout_constraintBottom_toTopOf="@+id/numberOfPlayers"
        android:layout_marginEnd="24dp"
        app:layout_constraintRight_toRightOf="parent"
        android:layout_marginBottom="23dp"
        android:layout_marginRight="24dp"/>

    <Switch
        android:text="@string/new_game"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/newGameSwitch"
        tools:layout_constraintTop_creator="1"
        android:layout_marginStart="16dp"
        android:layout_marginTop="188dp"
        tools:layout_constraintLeft_creator="1"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginLeft="16dp"/>

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:inputType="number"
        android:ems="10"
        android:id="@+id/numberOfPlayers"
        android:hint="@string/number_of_players"
        android:visibility="invisible"
        android:layout_marginStart="16dp"
        app:layout_constraintBaseline_toBaselineOf="@+id/newGameSwitch"
        tools:layout_constraintBaseline_creator="1"
        tools:layout_constraintLeft_creator="1"
        app:layout_constraintLeft_toRightOf="@+id/newGameSwitch"
        android:layout_marginLeft="16dp"/>

    <Button
        android:text="@string/start"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/startButton"
        tools:layout_constraintTop_creator="1"
        tools:layout_constraintBottom_creator="1"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        tools:layout_constraintRight_creator="1"
        tools:layout_constraintLeft_creator="1"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/errorText"
        tools:layout_constraintTop_creator="1"
        tools:layout_constraintRight_creator="1"
        tools:layout_constraintBottom_creator="1"
        app:layout_constraintBottom_toTopOf="@+id/serverAddress"
        app:layout_constraintRight_toRightOf="parent"
        android:layout_marginTop="48dp"
        tools:layout_constraintLeft_creator="1"
        android:layout_marginBottom="49dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:textAppearance="@style/TextAppearance.AppCompat.Headline"
        android:textColor="@color/dice_off"/>

</android.support.constraint.ConstraintLayout>
